<?php
/* @var $this yii\web\View */
$this->title = 'My Yii Application';
?>
<div class="site-index">

    <div class="jumbotron">
        <h1>2048Game 2015新赛季!</h1>

        <p class="lead">You will be the man who standing on top of the world !</p>

        <p><a class="btn btn-lg btn-success" style="display:inline-block" href="<?= yii::$app->urlManager->createUrl('game/solostart')?>"><?= yii::t('Site', "High Score")?></a>
        <a class="btn btn-lg btn-success" style="display:inline-block" href="<?= yii::$app->urlManager->createUrl('game/netstart')?>"><?= yii::t('Site', "Ladder Matches")?></a></p>
    </div>

    <div class="body-content">

        <div class="row">
            <div class="col-lg-3">
                <h2><?= yii::t('Site', "What is 2048")?></h2>
                <p><?= yii::t('Site', "\"2048\" is a digital puzzle game, and the \"2048\" initial numbers is composed of 2+2 base 4. In the operation of the different performance is moved one step style, become more readily a hell. The same number of party condition will add closer, collision. Digital box given system is either 2 or 4, the player must think of a way to make up the number \"2048\" box in this little 16 lattice range.")?></p>
            </div>
            <div class="col-lg-3">
                <h2><?= yii::t('Site', "How to play")?></h2>
                <p><?= yii::t('Site', "The rules of the game is very simple, each can choose above and below one direction to each slide, sliding a digital square, all will be close to the sliding direction, the system will be in the blank space, random number a digital square, the same number of block is added in closer, collision. Digital box given system is either 2 or 4, the player must think of a way to in this little 16 lattice range make a \"2048\" for the digital square.")?></p> 
            </div>
            <div class="col-lg-3">
                <h2><?= yii::t('Site', "Score Rank")?></h2>
                <table class="table">
                    <thead>
                            <th><?php echo yii::t('Site','User')?></th>
                            <th><?php echo yii::t('Site','Score')?></th>
                    </thead>
                    <tbody>
                        <?php $count = count($highRank) > 6 ? 6 : count($highRank);for($i=0;$i<$count;$i++):?>
                            <tr>
                                <td><?php echo $highRank[$i]->user_name?></td>
                                <td><?php echo $highRank[$i]->high_score?></td>
                            </tr>
                        <?php endfor;?>
                    </tbody>
                </table>

                <p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">+ More &raquo;</a></p>
            </div>
            <div class="col-lg-3">
                <h2><?= yii::t('Site', "Ladder Rank")?></h2>
                <table class="table">
                    <thead>
                            <th><?php echo yii::t('Site','User')?></th>
                            <th><?php echo yii::t('Site','Score')?></th>
                    </thead>
                    <tbody>
                        <?php $count = count($ladderRank) > 6 ? 6 : count($ladderRank);for($i=0;$i<$count;$i++):?>
                            <tr>
                                <td><?php echo $ladderRank[$i]->user_name?></td>
                                <td><?php echo $ladderRank[$i]->ladder_score?></td>
                            </tr>
                        <?php endfor;?>
                    </tbody>
                </table>
                <p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">+ More &raquo;</a></p>
            </div>

        </div>

    </div>
</div>
